﻿@{
    ViewBag.Title = "Hottest";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}

<h3>Hottest</h3>
    <form method="post" action="" enctype="multipart/form-data"> 
        <label>热门油画</label>
        <input type="text" value="@ViewBag.HosttestString" class="text-input small-input" name="hottest" id="hottest" />
        <input type="button" class="button" onclick="updateHottest();" value="更新"/>
    </form>

    <script>
        function updateHottest() {
            $.ajax({
                url: '/admin/painting/updatehottest',
                async: false,
                cache: false,
                type: "post",
                dataType: "json",
                data: "hottest=" + escape($.trim($("#hottest").val())),
                success: function (result) {
                    if (result.status) {
                        alert("更新成功");
                    } else {
                        alert("更新失败");
                    }
                }
            });
        }
    </script>